package com.yycx.module.bus.provider.handler.haiying.tasktodo.settle;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.interceptor.DeleteInterceptor;
import com.yycx.common.mybatis.query.CriteriaDelete;
import com.yycx.module.bus.provider.service.hy.BusHyorderInoviceDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * 发票删除
 *
 * @author zyf
 */
@Component
public class HyInvoiceFpDeleteHandler implements DeleteInterceptor {
    @Autowired
    private BusHyorderInoviceDetailsService orderInoviceDetailsService;

    @Override
    public void prepare(CriteriaDelete criteriaDelete, EntityMap entityMap) {

    }

    @Override
    public void complete(CriteriaDelete cd, EntityMap params) {
        Serializable inoviceId = cd.getIdValue();
        orderInoviceDetailsService.clearSettleFpId(inoviceId);
    }
}
